﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Newtonsoft.Json;
using WMS.Model;
using WMS.SQLServerDAL;
namespace WMS.BLL
{
   public class StockInManage
    {
       StockInData data = new StockInData();
       public List<StockInModel> GetProductInfoByEntCode(string entCode)
       {
            List<StockInModel> ls = data.BuildStockInModel(entCode); 
            ls = data.BuildStockInModel(entCode);
            return ls;
       }

       /// <summary>
       ///  将扫描好的所有信息入库
       /// </summary>
       /// <param name="xmlEntList"></param>
       /// <param name="currUser"></param>
       /// <returns></returns>
       public string StockInList(string xmlEntList,User currUser)
       {
           string result = string.Empty;
           result = data.StockInList(xmlEntList, currUser);
           return result;
       }

       /// <summary>
       /// 根据入库单号获取入库信息
       /// </summary>
       /// <param name="entTms"></param>
       /// <returns></returns>
       public DataTable GetILIPOSInfoByBil(string bilCode)
       {
           DataTable dt = new DataTable();
           dt = data.GetILIPOSInfoByBil(bilCode);
           return dt;
       }

       /// <summary>
       /// 获取入库后的入库单号信息
       /// </summary>
       /// <returns></returns>
       public DataTable GetPosBilDetailInfo(string bil)
       {
           DataTable dt = new DataTable();
           dt = data.GetPosBilDetailInfoData(bil);
           //return dt;
           return dt;
       }

       #region 获取默认的用户信息
      
       
       #endregion


       public bool ExistTmInITHPOS(string tm)
       {
           return data.GetExistTmInITHPOSCn(tm);
       }

       public DataTable GetWHSInfoBysupId(string supId)
       {
           return data.GetWHSInfoBysupIdData(supId);
       }
    }
}
